
#ifndef _Oz_Webui_Exception_H_
#define _Oz_Webui_Exception_H_

#include <exception>
#include <string>

namespace Oz{
    namespace Webui{

        class Exception : public std::exception{
            public:
            virtual ~Exception() throw();
            virtual const char* what()const throw() = 0;
        };

        class InternalException : public Exception{
            protected:
            std::string _file;
            int _line;
            std::string _what;
            public:
            InternalServerException(const std::string& file,int line,const std::string& what);
            ~InternalServerException()throw();
            virtual const char* what()const throw();
            virtual const char* html()const throw() = 0;
        };

        class WebpageNotFoundException : public Exception{
            protected:
            std::string _uri;
            public:
            PageNotFoundException(const std::string& uri);
            ~PageNotFoundException() throw();
            virtual const char* what()const throw();
            virtual const char* html()const throw() = 0;
        };
    }
}
#endif
